<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>rich editor</title>
    <style>
        .rich_editor {
            width: 200px;
            height: 200px;
        }
    </style>
</head>

<body>
    <iframe name="richeditor" class="rich_editor"></iframe>
    <script>
        window.addEventListener('load', () => {
            frames['richeditor'].document.designMode = 'on';
        })
    </script>
</body>

</html>